uniform sampler2D TerrainTex1;
uniform sampler2D TerrainTex2;

varying vec2 OutTexValue;

void main()
{ 	
	if (OutTexValue.x + OutTexValue.y < 0.0001) discard;
	vec3 tex1 = texture2D(TerrainTex1, gl_TexCoord[0].xy).rgb * OutTexValue.x;
	vec3 tex2 = texture2D(TerrainTex2, gl_TexCoord[0].xy).rgb * OutTexValue.y;
	gl_FragColor = vec4(tex1 + tex2, 1.0);
}
